<?php
/**
 * Created by PhpStorm.
 * User: yangyou
 * Date: 2018/12/27 0027
 * Time: 15:25
 */

namespace app\index\model;


class UserAddress extends Base
{
    /**
     * Author:yang you
     * Time:2018-12-2 10:27:51
     * Describe:地址列表
     * @param string designer_level
     * @param string $cate
     * @param string $layct
     * @return int|string
     */
    public function addressList($user_id = ""){
        return $this
            ->where(function ($q)use ($user_id){
            if(!empty($user_id)){
                $q->where("user_id",$user_id);
            }
        })
            ->orderRaw("address_id DESC")
            ->select();
    }

}